<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<!-- <link rel="stylesheet" href="year.php"> -->

<body>
    <form action="" method='post'>
        <b>请输入年：</b>
        <input type="text" name='year'>
        <input type="submit" name='sub' value="查询">

    </form>
</body>


</html>
<?php
//   echo "2000是闰年";
//   echo "请输入年份：<input type='text' name='year'>";
//   if(isset($))
// var_dump($_POST);
  
  if(isset($_POST['year'])){
      
    $year =$_POST['year'];
    if($year!==''){
          if(($year%4==0 || $year%100==0) && $year%400!=0){
              echo '是闰年';
            //   $msg='是闰年';
          }else{
            echo '不是闰年';
            // $msg='不是闰年';
          }
        }
        else{
            echo '输入框不能为空';
        }
  }
?>